'use strict';
/*
 * 工单管理
 * @type {*}
 */
let underscore = require('underscore');
let RestifyProxy = require('../../util/RestifyProxy');
let StringUtil = require('../../util/StringUtil');
let Constant = require('../../model/Constant');
let baseService = require('../BaseService');
const URI = {
    ORDER: '/users',//列表
    DETAIL: '/users/{0}/info',//详情
    SIGN: '/users',//签收按钮
    DISCARD: '/users/{0}',//废弃按钮
    CHANGE: '/users/{0}',//改派按钮
    AUDIT: '/users/{0}',//审核按钮
    DISPOSE: '/users/{0}'//处理按钮
};

/*工单管理——列表*/
module.exports.orderList = function (thiz, params) {
    return baseService.get(thiz, URI.ORDER, params);
};
/*工单管理——详情*/
module.exports.detailData = function (thiz, userId) {
    return baseService.get(thiz, StringUtil.format(URI.DETAIL, userId));
};
/*工单管理——签收按钮*/
module.exports.signBtn = function (thiz, userId) {
    return baseService.put(thiz, StringUtil.format(URI.SIGN, userId));
};
/*工单管理——废弃按钮*/
module.exports.discardBtn = function (thiz, userId) {
    return baseService.put(thiz, StringUtil.format(URI.DISCARD, userId));
};
/*工单管理——改派按钮*/
module.exports.changeBtn = function (thiz, userId) {
    return baseService.put(thiz, StringUtil.format(URI.CHANGE, userId));
};
/*工单管理——审核按钮*/
module.exports.auditBtn = function (thiz, userId) {
    return baseService.put(thiz, StringUtil.format(URI.AUDIT, userId));
};
/*工单管理——处理按钮*/
module.exports.disposeBtn = function (thiz, userId) {
    return baseService.put(thiz, StringUtil.format(URI.DISPOSE, userId));
};